//
//  QiXingTableViewCell.m
//  XingRun
//
//  Created by 赵颜彬 on 17/1/13.
//  Copyright © 2017年 赵颜彬. All rights reserved.
//

#import "QiXingTableViewCell.h"

@implementation QiXingTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"商城背景"]];
        [self.contentView addSubview:_img];
        
        self.name = [[UILabel alloc] init];
         self.name.font = [UIFont fontWithName:@"Helvetica" size:12];
        _name.text = @"获得星豆 : 16";
        [self.img addSubview:_name];
        
        self.date = [[UILabel alloc] init];
        self.date.text = @"2016-9-8 10:00-2016-9-8 11:30";
         self.date.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self.img addSubview:_date];
        
        self.time = [[UILabel alloc] init];
        _time.text = @"累计时间 : 01 : 30";
         self.time.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self.img addSubview:_time];
        
        self.km = [[UILabel alloc] init];
         self.km.font = [UIFont fontWithName:@"Helvetica" size:12];
        _km.text = @"骑行距离 : 16km";
        [self.img addSubview:_km];
        
        self.sudu = [[UILabel alloc] init];
        _sudu.text = @"平均速度26km/h";
         self.sudu.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self.img addSubview:_sudu];
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.img.frame = CGRectMake(0 * WIDTH, 10 * HEIGHT, 375 * WIDTH, 170 * HEIGHT);
    self.date.frame = CGRectMake(10 * WIDTH, 10 * HEIGHT, 250 * WIDTH, 30 *HEIGHT);
        self.time.frame =CGRectMake(10 * WIDTH, 40 * HEIGHT, 150 * WIDTH, 30 * HEIGHT);
    self.km.frame =CGRectMake(10 * WIDTH, 70 * HEIGHT, 150 * WIDTH, 30 * HEIGHT);
     self.sudu.frame =CGRectMake(10 * WIDTH, 100 * HEIGHT, 150 * WIDTH, 30 * HEIGHT);
     self.name.frame =CGRectMake(10 * WIDTH, 130 * HEIGHT, 150 * WIDTH, 30 * HEIGHT);

}

@end
